/**
 * @file gui_dfx.cpp
 * @author ThomasKingFree
 * @brief
 * @version 0.1
 * @date 2021-03-16
 *
 * @copyright Copyright (c) 2021
 *
 */

#include "utils/gui_dfx.h"

#include <cstdarg>
#include <cstdio>
#include <cstring>
#include <iostream>

namespace YueGUI {
void Dfx::Assert(bool condition) {
    while (condition == false) {
        ;
    }
}
void Dfx::Log(LogLevel level, const char *format, ...) {
    va_list pArgList;
    va_start(pArgList, format);
    static char outputBuffer[256] = {0};
    memset(outputBuffer, 0, sizeof(outputBuffer));
    sprintf_s(outputBuffer, format, pArgList);
    std::cout << outputBuffer << std::endl;
    va_end(pArgList);
}
} // namespace YueGUI
